#ifndef LRCPAGE_H
#define LRCPAGE_H

#include <QWidget>
#include<QPropertyAnimation>

struct LrcWordLine{

    LrcWordLine(qint64 lrcTime,QString lrcText){
        this->lrctext=lrcText;
        this->lrctime=lrcTime;
    }
    qint64 lrctime;
    QString lrctext;
};

namespace Ui {
class LrcPage;
}

class LrcPage : public QWidget
{
    Q_OBJECT

public:
    explicit LrcPage(QWidget *parent = nullptr);
    ~LrcPage();

    bool parseLrcFile(const QString&lrcFilePath);
    void showLrcWordLine(qint64 time);
    int getLrcWordLineIndex(qint64 time);
    QString getLrcWordByIndex(int index);

    void setSinger(QString singer);
    void setName(QString name);

private:
    Ui::LrcPage *ui;
    QPropertyAnimation *animal;
    QVector<LrcWordLine> lrcWordLines;
    QString singer;
    QString name;

};

#endif // LRCPAGE_H
